package employee_evaluation

type OvertimeLeaveInsert struct {
	// EmployeeID   int    `json:"employee_id" binding:"required"`
	// DepartmentID int    `json:"department_id" binding:"required"`
	// PositionID   int    `json:"position_id" binding:"required"`
	// Phone        string `json:"phone" binding:"required"`
	LeaveType    string `json:"leave_type" binding:"omitempty,oneof=sick personal annual marriage maternity bereavement"`
	StartDate    string `json:"start_date" binding:"required"`
	EndDate      string `json:"end_date" binding:"required"`
	Day          int    `json:"day" binding:"gte=0"`
	Hour         int    `json:"hour" binding:"gte=0,lte=23"`
	Minute       int    `json:"minute" binding:"gte=0,lte=59"`
	Reason       string `json:"reason"`
	ApplyTime    string `json:"apply_time" binding:"required"`
	RecordType   string `json:"type" binding:"required,oneof=overtime leave"`
}

type OvertimeLeaveUpdate struct {
	ID           int    `json:"id" binding:"required"`
	EmployeeID   int    `json:"employee_id" binding:"required"`
	DepartmentID int    `json:"department_id" binding:"required"`
	PositionID   int    `json:"position_id" binding:"required"`
	Phone        string `json:"phone" binding:"required"`
	LeaveType    string `json:"leave_type" binding:"required,oneof=sick personal annual marriage maternity bereavement"`
	StartDate    string `json:"start_date" binding:"required"`
	EndDate      string `json:"end_date" binding:"required"`
	Day          int    `json:"day" binding:"gte=0"`
	Hour         int    `json:"hour" binding:"gte=0,lte=23"`
	Minute       int    `json:"minute" binding:"gte=0,lte=59"`
	Reason       string `json:"reason"`
	ApplyTime    string `json:"apply_time" binding:"required"`
	RecordType   string `json:"type" binding:"required,oneof=overtime leave"`
}

type OvertimeLeaveShow struct {
	ID           int    `form:"id" json:"id"`
	
}



type OverTimeLeaveListSearch struct {
	RecordType   string `json:"type" form:"type" binding:"omitempty,oneof=overtime leave" ` // 类型
	DepartmentID int    `json:"department_id" form:"department_id" binding:"omitempty"` // 部门ID
	LeaveType    string `json:"leave_type" form:"leave_type" binding:"omitempty,oneof=sick personal annual marriage maternity bereavement"` // 请假类型
	SearchDate   string `json:"search_date" form:"search_date" binding:"omitempty"` // 搜索日期
	Status       string `json:"status" form:"status" binding:"omitempty,oneof=pending approved rejected withdrawn"`
	EmployeeID   int    `json:"employee_id" form:"employee_id" binding:"omitempty"`
}

type ChangeStatusFields struct {
	ID     int    `json:"id" binding:"required"`
	Status string `json:"status" binding:"required,oneof=pending approved rejected withdrawn"`
	RejectionNote string `json:"rejection_note" binding:"omitempty"`
}

type CalcOvertimeLeaveField struct {
	EmployeeId int `json:"employee_id" binding:"omitempty"`
	SearchDate string `json:"search_date" binding:"omitempty"`
}

type ListMonthField struct {
	SearchDate string `form:"search_date" json:"search_date" binding:"required"`
}
